package com.hlhj.funlike_business.presenter;

import android.content.Context;

import com.example.mymvp.mvp.BasePresenter;
import com.hlhj.funlike_business.bean.FoodDetailBean;
import com.hlhj.funlike_business.moudle.MyCommodityDetailMoudle;
import com.hlhj.funlike_business.views.MyCommodityDetailView;

public class MyCommodityDetailPresenter extends BasePresenter<MyCommodityDetailMoudle,MyCommodityDetailView> implements MyCommodityDetailMoudle.getFoodDetail {
    @Override
    public void createModule() {
        module = new MyCommodityDetailMoudle();
        module.setListener(this);
    }

    public void LoadFoodDetail(Context context,int id){
        module.LoadFoodDetail(context,id);
    }

    public void LoadFoodDel(Context context,int id){
        module.LoadDelFoodResult(context,id);
    }
    @Override
    public void loadFoodDetail(FoodDetailBean.DataBean dataBean) {
        getView().showDetail(dataBean);
    }

    @Override
    public void loadDelResult(String msg) {
        getView().showDelResult(msg);
    }
}
